﻿using System;

namespace VIT.Web.Modules.CategoryList
{
    public partial class CategoryList : VIT.Web.UI.VITModule
    {
        protected VIT.Business.BLCategory obj;

        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                obj = new VIT.Business.BLCategory();
                obj.LanguageId = Session["language"].ToString();

                int Cat;
                try { Cat = int.Parse(Params["Category"]); }
                catch { Cat = -1; }

                if (Cat > 0) rpt.DataSource = obj.GetListChuildCat(Cat);
                else rpt.DataSource = obj.GetListChuildCat(0);

                //CategoryProvider fnp = new CategoryProvider();
                //fnp.LanguageId = Session["language"].ToString();
                //rpt.DataSource = fnp.loadTop(Params);
                rpt.DataBind();
            }
        }
    }
}